package com.framework.app.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.framework.app.entity.dto.AppMemberQueryDTO;
import com.framework.app.entity.vo.AppMemberListVO;
import com.framework.app.service.IAppMemberService;
import com.framework.core.log.annotation.AutoLog;
import com.framework.core.result.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 会员管理
 *
 * @author Kevin
 * @since 2022-05-03
 */
@RestController
@RequestMapping("/app/appMember")
@AllArgsConstructor
public class AppMemberController {

    private IAppMemberService appUserService;

    /**
     * 分页查询会员列表
     */
    @GetMapping("/selectAppMemberWithPage")
    @SaCheckPermission("app:appUser:selectAppMemberWithPage")
    @AutoLog(module = "会员管理", title = "分页查询会员列表")
    public R<Page<AppMemberListVO>> selectAppMemberWithPage(Page<?> reqPage, AppMemberQueryDTO req) {
        return R.success(appUserService.selectAppMemberWithPage(reqPage, req));
    }

}

